const guo = require("crypto-js");
l = {
    key: guo.enc.Utf8.parse("fX@VyCQVvpdj8RCa"),
    iv: guo.enc.Utf8.parse(function (t) {
        for (var e = "", i = 0; i < t.length - 1; i += 2) {
            var n = parseInt(t[i] + "" + t[i + 1], 16);
            e += String.fromCharCode(n)
        }
        return e
    }("00000000000000000000000000000000"))
}
    , v = function (data) {
    return function (data) {
        return guo.AES.encrypt(data, l.key, {
            iv: l.iv,
            mode: guo.mode.CBC,
            padding: guo.pad.Pkcs7
        }).toString()
    }(data)
}
    , d = function (data) {
    return guo.MD5(data).toString()
}
    , f = function (t) {
    var e = "";
    return Object.keys(t).sort().forEach((function (n) {
            e += n + ("object" === typeof (t[n]) ? JSON.stringify(t[n], (function (t, e) {
                    return "number" == typeof e && (e = String(e)),
                        e
                }
            )).replace(/\//g, "\\/") : t[n])
        }
    )),
        e
}
    , h = function (t) {
    var data = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}
        , e = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : "a75846eb4ac490420ac63db46d2a03bf"
        , n = e + f(data) + f(t) + e;
    return n = d(n),
        n = v(n)
}
let U = {
    "App-Ver": "",
    "Os-Ver": "",
    "Device-Ver": "",
    "Imei": "",
    "Access-Token": "",
    "Timestemp": 1722449864,
    "NonceStr": "1722428864aiwc2",
    "App-Id": "4ac490420ac63db4",
    "Device-Os": "web"
};
let M = {
    'username': '111111111',
    'password': '111111111',
    'code': '',
    'hdn_refer': 'https://www.epwk.com/',
};
const c = 'a75846eb4ac490420ac63db46d2a03bf'
var n = "a75846eb4ac490420ac63db46d2a03bfcodehdn_referhttps://www.epwk.com/password111111111username111111111Access-TokenApp-Id4ac490420ac63db4App-VerDevice-OswebDevice-VerImeiNonceStr1722428864aiwc2Os-VerTimestemp1722428864a75846eb4ac490420ac63db46d2a03bf"

//测试
// console.log(h(U, M, c))
// console.log(d(n))